package com.itheima.d4.LocalDate_LocalDateTime_LocalTime;

import java.time.LocalDate;
import java.time.LocalTime;
import java.time.MonthDay;

public class Test {
    public static void main(String[] args) {
        LocalTime localTime = LocalTime.now();
        System.out.println(localTime);
        System.out.println(localTime.minusHours(1));
        System.out.println("==========");
        LocalDate birthDate = LocalDate.of(1993,6,29);
        System.out.println(birthDate);
        LocalDate localDate = LocalDate.now();
        System.out.println(localDate.equals(birthDate));
        System.out.println(localDate.isAfter(birthDate));
        System.out.println(localDate.isBefore(birthDate));
        System.out.println("-----生日判断----");

        int monthValue = birthDate.getMonthValue();
        int dayOfMonth = birthDate.getDayOfMonth();
        MonthDay monthDay = MonthDay.of(monthValue,dayOfMonth);
        System.out.println(monthDay);
        //直接从localdate拿到 月 日
        MonthDay day = MonthDay.from(localDate);
        System.out.println(day);
        System.out.println(monthDay.equals(day));
    }
}
